package io.finer.erp.jeecg.stock.service;

import io.finer.erp.jeecg.bas.entity.BasMaterial;
import io.finer.erp.jeecg.stock.entity.StkIoMaterialLog;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @Description: 物料出入库记录表
 * @Author: jeecg-boot
 * @Date:   2020-09-24
 * @Version: V1.0
 */
public interface IStkIoMaterialLogService extends IService<StkIoMaterialLog> {
	public void insertLog(String billId, Date createTime, String entityId, String ioType
			, Integer isAccount, BasMaterial material, String unitId
			, String orderId, Integer inOrOut, BigDecimal cost
			, BigDecimal amount, String processId);
	
	public List<StkIoMaterialLog> getByProcess(String processId);

	public String getProcessIdFromLog(String orderNum, String id);

	/**
	 * @Description 根据出入库单的明细ID查询出入库log记录
	 * @param entryIds
	 * @return
	 * Create at: 2020-11-20 15:38:35
	 * @author: duany
	 * Revision:
	 *    2020-11-20 15:38:35 - first revision by duany
	 *        
	 */
	public List<StkIoMaterialLog> selectByEntryIds(List<String> entryIds);

	/**
	 * @Description 查询物料的出入库记录
	 * @param materialId
	 * @return
	 * Create at: 2020-12-01 11:20:28
	 * @author: duany
	 * Revision:
	 *    2020-12-01 11:20:28 - first revision by duany
	 *        
	 */
	public List<StkIoMaterialLog> getByMaterial(String materialId);
}
